\documentclass[12pt]{article}

\usepackage{graphicx,float,wrapfig}
\usepackage{color}
\usepackage{listings}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{extramarks}

\setcounter{secnumdepth}{2}

%Margins
\topmargin=0cm
\oddsidemargin=0cm
\textheight=22.0cm
\textwidth=16cm
\parindent=0cm
\parskip=0.15cm
\topskip=0truecm
\raggedbottom
\abovedisplayskip=3mm
\belowdisplayskip=3mm
\abovedisplayshortskip=0mm
\belowdisplayshortskip=2mm
\normalbaselineskip=12pt
\normalbaselines

% Homework Specific Information
\newcommand{\hmwkTitle}{Requirements Document}
\newcommand{\hmwkDueDate}{Sunday, February 5, 2012}
\newcommand{\hmwkClass}{COMP 354}
\newcommand{\hmwkClassTime}{Thursday 17:45}
\newcommand{\hmwkClassInstructor}{Greg Butler}
\newcommand{\hmwkTeamNum}{Group 5}
\newcommand{\hmwkTeamMembers}{
	Domenico Romano & 5574331 \\
	Ghassan Fakih & 4078748\\
	Izz Kaddoura & 9450106\\
	Jon Leckman & 4960122\\
	Matt Baum & 9753095\\
	Sandy Carter & 1121057 \\
	Samantha Graham & 1120689\\
	Van Nicoghosian & 9587071\\
}
\newcommand{\hmwklogo}{\includegraphics[width=150mm]{concordialogo.png}}

% Use case diagram
\newcommand{\useCaseDiagram}{
\begin{figure}[htbp]
\includegraphics[height=160mm]{System_Use_Case.png}
\caption{System Use Case Diagram}
\label{fig:use-case-diagram}
\end{figure}
}

% Domain Model Diagram
\newcommand{\domainDiagram}{
\begin{figure}[htbp]
\includegraphics[height=160mm]{DomainModel.png}
\caption{Domain Model Diagram}
\label{fig:domain-model-diagram}
\end{figure}
}


% Setup the header and footer
\pagestyle{fancy}                                                       %
% Header                                                                %
\lhead{\hmwkTeamNum}                                     % Left         %
\chead{\hmwkTitle}                                       % Center       %
\rhead{\hmwkClass\ (\hmwkClassInstructor)}               % Right        %
% Footer                                                                %
\lfoot{\lastxmark}                                       % Left         %
\cfoot{}                                                 % Center       %
\rfoot{Page\ \thepage\ of\ \pageref{LastPage}}           % Right        %
\renewcommand\headrulewidth{0.4pt}                                      %
\renewcommand\footrulewidth{0.4pt}                                      %

% Templates Info
\newcommand{\projectname}{\textbf{TaskPro}}
\newcommand{\targetuser}{\textcolor{red}{TARGETUSER}} % do not keep red\
\newcommand{\targetbusiness}{\textbf{New Design Inc.}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Make Title
\title{
	\hmwklogo
	\vspace*{0.5in}
	\centerline{\bf\Large\hmwkTitle}
}
\author{\hmwkTeamNum}
\date{\hmwkDueDate}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\maketitle
\thispagestyle{empty}
\vspace*{1.5in}
\begin{table}[htbp]
	\caption{Team}
	\begin{center}
	\begin{tabular}{|r | c|}
	\hline
	\textbf{Name} & \textbf{ID Number} \\
	\hline\hline
	\hmwkTeamMembers
	\hline
\end{tabular}
\end{center}	
\end{table}


\tableofcontents
\clearpage

\section{System}
\addcontentsline{toc}{section}{System}
This section introduces the global context for the development of the \projectname\ task management system.
Here, we outline the general goals that must be achieved by the system, in order to satisfy customer
demands.

\subsection{Purpose}
The purpose of the current document is to set out requirements for the \projectname \ task management system.\\
This document will additionally describe the intended users (actors) of the application.

\begin{table}[htbp]
\caption{Intended Audience}
\begin{center}
\begin{tabular}{|l |l |}
\hline
\textbf{Group of the readers} & \textbf{Reasons for reading} \\
	\hline\hline
Users and customers & To give feedback about the requirements \\\hline
System developers & To understand what functions and properties the system must contain \\\hline
Testers & To test the system against the requirements\\\hline
Writers of user manuals & To get material for user manuals\\\hline
Project team & To follow-up the status of the project against the requirements\\
	\hline
	\end{tabular}
	\end{center}
	\end{table}
 

\subsection{Context}
The \projectname\ task management solution will be used by \targetbusiness.\\
\targetbusiness\ currently offers customized web solutions to small-and-medium sized businesses. These include web site services such as advertisement, online shopping, customer support, and mailing lists. Having experienced a period of growth in the past year, \targetbusiness\ is currently seeking to improve productivity by more efficiently organizing and managing work tasks within the company.\\
At \targetbusiness, each department currently manages its own scheduling and worker assignments
through its own means. Thus, each department tracks the completion of tasks separately from other departments, and this often leads to a lack of proper coordination between them.\\

\subsection{Business Goals}
The individual management of task allotments carried out by departments in \targetbusiness\ results in a lack
of consistency in scheduling. The \projectname\ task management system seeks to address
this problem by offering a centralized location for scheduling information, that can be manipulated by workers and
managers from all departments.\\
Additionally, \projectname\ will offer a common interface for all employees of \targetbusiness\ to refer to.

\clearpage
\section{Domain Concepts}

This section describes the problem domain for the \projectname\ Task Management System. \\

\begin{table}[htbp]
\caption{Domain Concepts}
\begin{center}
\begin{tabular}{|l |p{10cm} |}
\hline
\textbf{Concept} & \textbf{Description} \\
	\hline\hline
Task & In the context of the workplace, a piece of work that needs to be completed \\\hline
Subtask & One of the parts that a task is broken down into; in order for the main task to be completed, its subtasks must first be completed \\\hline
GANTT chart & A bar chart that illustrates a task schedule\\\hline
Managers & A person in charge of a group of workers, and who handles the scheduling of those workers' tasks\\\hline
Workers & A person whose job it is to complete tasks assigned to him or her by his or her manager \\
	\hline
	\end{tabular}
	\end{center}
	\end{table}

\clearpage
\section{Actors}

This section describes the user types (actors) for the \projectname\ Task Management System.
We distinguish between two general classes of actors: ``workers'', who consult the system to
plan out their own work processes, and ``managers'', who use the system to plan the work tasks
of their respective departments.
The actors are described in the following table:

\begin{table}[htbp]
	\caption{Actors}
	\begin{center}
	\begin{tabular}{|l |p{7cm} |l |}
	\hline
	\textbf{Actor} & \textbf{Description} & \textbf{Number of users} \\
	\hline\hline
		Worker & Workers use the system to consult the tasks assigned to them.
		They use the system to plan the order in which to complete their work tasks.
		Workers also use the task management system to update the status of tasks assigned to them. & approx. 200 \\\hline
		Manager & Managers use the system to consult the overall scheduling and progress of tasks for their department.
				They use the system to order tasks, set task dependencies, and assign tasks to workers.
				Managers also use the task management system to update task statuses, and create new tasks. {\bf NOTE:} Managers also act as Workers, in that they must use the system to manage the tasks assigned to them through upper management. & approx 12\\
	\hline
	\end{tabular}
	\end{center}
\end{table}

\clearpage
\section{Use Cases}
This section describes the typical scenarios that are expected to arise in the use of the \projectname\ task management system. In each case, we identify the type of actor (worker, or manager) that is expected to carry out this set of actions. Note that, as previously mentioned, managers may also act as workers, as they receive task assignments from their own managers.

\subsection{Overview}
Each use case is documented below. Additionally, the use cases are represented globally in the System Use Case Diagram.\\
\textbf{NOTE:} View Annex A3 (p.\pageref{fig:use-case-diagram}) for the System Use Case Diagram.\\

\subsubsection{Use Case 1} \label{uc:1}

\noindent
{\bf Name}\\
View assigned task information

\noindent
{\bf Summary}\\
The worker needs to know the details of the tasks assigned to him or her in order to determine what to focus on for his or her work day. The worker should be able to view all the information relative to the tasks assigned to him or her: the number of hours already logged to it; the deadline; the deliverables; the subtasks; the GANTT chart.

\noindent
{\bf Actors}\\
Workers

\noindent
{\bf Precondition}\\
The worker must be logged in to the system

\noindent
{\bf Main Scenario}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The worker logs into the system
\item The worker consults his or her task list
\end{enumerate}

\noindent
{\bf Exceptions}\\
n/a
\noindent
{\bf Postcondition}\\
The worker has all the details about the tasks assigned to him or her.
\noindent
{\bf Priority}\\
Must
\noindent
{\bf Traces to Test Cases}\\
Add when test cases done.

\subsubsection{Use Case 2} \label{uc:2}

\noindent
{\bf Name}\\
Log hours to a task

\noindent
{\bf Summary}\\
In order for managers to track how much time is spent on each task, as well as for payroll, a worker must log his or her hours spent on a task

\noindent
{\bf Actors}\\
Workers

\noindent
{\bf Precondition}\\
The task that the worker wants to log hours to must already be assigned to that worker; the worker must be logged in to the system

\noindent
{\bf Main Scenario}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The worker opens his or her task list
\item The worker adds the hours he or she has spent on the task in question
\item The worker closes the task list
\end{enumerate}

\noindent
{\bf Exceptions}\\
n/a
\noindent
{\bf Postcondition}\\
The number of hours the worker has spent on that particular task has been updated.
\noindent
{\bf Priority}\\
Must
\noindent
{\bf Traces to Test Cases}\\
Add when test cases done.

\subsubsection{Use Case 3} \label{uc:3}

\noindent
{\bf Name}\\
Change task status to complete

\noindent
{\bf Summary}\\
When a task is complete, a worker needs to change its status to complete so that managers can be aware that a task is done and potentially assign new tasks to a worker.

\noindent
{\bf Actors}\\
Workers

\noindent
{\bf Precondition}\\
The task to be changed must not be already set to complete

\noindent
{\bf Main Scenario}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The worker opens his or her task list
\item The worker set the status of the task in question to complete
\item The worker closes the task list
\end{enumerate}

\noindent
{\bf Exceptions}\\
n/a
\noindent
{\bf Postcondition}\\
The task has been marked as completed; the manager has been notified.
\noindent
{\bf Priority}\\
Must
\noindent
{\bf Traces to Test Cases}\\
Add when test cases done.

\subsubsection{Use Case 4} \label{uc:4}

\noindent
{\bf Name}\\
Create a new task

\noindent
{\bf Summary}\\
When a task arises that needs completion, a manager must be able to create a new task in the system so that its status can be tracked.

\noindent
{\bf Actors}\\
Managers

\noindent
{\bf Precondition}\\
The task to be added must not already exist in the system

\noindent
{\bf Main Scenario}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The manager enters the details about the new task
\item The manager saves the new task in the system
\end{enumerate}

\noindent
{\bf Exceptions}\\

\noindent
{\bf Postcondition}\\
A new task has been added to the list of tasks in the system

\noindent
{\bf Priority}\\
Must
\noindent
{\bf Traces to Test Cases}\\
Add when test cases done.

\subsubsection{Use Case 5} \label{uc:5}

\noindent
{\bf Name}\\
Assign a task

\noindent
{\bf Summary}\\
When a new task is created, a manager must be able to assign it to a worker so that it can be completed. By assigning a task to a specific worker, managers can track accountability and the status of the task.

\noindent
{\bf Actors}\\
Managers

\noindent
{\bf Precondition}\\
The task must have been created in the system. The worker that the manager wants to assign the task to must exist in the system.

\noindent
{\bf Main Scenario}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The manager chooses which worker to assign the task to
\item The manager adds the task in question to that particular worker's list of tasks
\end{enumerate}

\noindent
{\bf Exceptions}\\
n/a

\noindent
{\bf Postcondition}\\
The task has been assigned to a particular worker.

\noindent
{\bf Priority}\\
Must
\noindent
{\bf Traces to Test Cases}\\
Add when test cases done.

\subsubsection{Use Case 6} \label{uc:6}

\noindent
{\bf Name}\\
Change a task's assigned worker

\noindent
{\bf Summary}\\
If for any reason a worker can no longer work on a task, a manager must be able to assign that task to someone else.

\noindent
{\bf Actors}\\
Managers

\noindent
{\bf Precondition}\\
The task must have been created in the system. The worker that the manager wants to assign the task to must exist in the system.

\noindent
{\bf Main Scenario}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The manager chooses which new worker to assign the task to
\item The manager removes the task from the first worker's list of tasks
\item The manager adds the task to the new worker's list of tasks
\end{enumerate}

\noindent
{\bf Exceptions}\\
n/a

\noindent
{\bf Postcondition}\\
The task has been assigned to a new worker.

\noindent
{\bf Priority}\\
Must
\noindent
{\bf Traces to Test Cases}\\
Add when test cases done.

\subsubsection{Use Case 7} \label{uc:7}

\noindent
{\bf Name}\\
Update information about a task

\noindent
{\bf Summary}\\
When a task's description, deadline, milestones, or deliverables change, a manager must be able to update that information for the benefit of the worker working on that task.

\noindent
{\bf Actors}\\
Managers

\noindent
{\bf Precondition}\\
The task must have been created in the system. 

\noindent
{\bf Main Scenario}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The manager updates the task information
\item The manager saves the updated task in the system
\end{enumerate}

\noindent
{\bf Exceptions}\\
n/a

\noindent
{\bf Postcondition}\\
The task information is updated and the worker assigned to it is aware of the change.

\noindent
{\bf Priority}\\
Must
\noindent
{\bf Traces to Test Cases}\\
Add when test cases done.

\subsubsection{Use Case 8} \label{uc:8}

\noindent
{\bf Name}\\
View task details

\noindent
{\bf Summary}\\
Mangers need to stay up to date on all tasks in the system, including time spent by workers on their tasks, completion status, etc.

\noindent
{\bf Actors}\\
Managers

\noindent
{\bf Precondition}\\
The task that the manager wants to view must have been created in the system

\noindent
{\bf Main Scenario}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The manager opens the list of tasks and retrieves the information he or she needs
\item The manager closes the list of tasks when he or she has the required information
\end{enumerate}

\noindent
{\bf Exceptions}\\
n/a

\noindent
{\bf Postcondition}\\
The manager has the information he or she needs about the task in question

\noindent
{\bf Priority}\\
Must
\noindent
{\bf Traces to Test Cases}\\
Add when test cases done.

\clearpage
\section{Functional Constraints}
In this section, we outline the required features of the \projectname\ task management system,
as indicated by clients. The required functionality for the system is outlined in the table below:

\subsection{Requirement: Viewing Task Assignments}

{\bf ID:} F01\\
{\bf Version:} 1\\
{\bf Rationale:} All users need to occasionally consult the tasks which have been assigned to them, as well as task assignments for related workers.\\
{\bf Priority:} Must\\
{\bf Status:} Proposed\\
{\bf Trace(s) to Use Case(s):} View Tasks\\

\subsection{Requirement: Viewing Task Dependencies}

{\bf ID:} F02\\
{\bf Version:} 1\\
{\bf Rationale:} Users must be able to view task hierarchies, in order to complete assigned tasks with all of their prior dependencies.\\
{\bf Priority:} Must\\
{\bf Status:} Proposed\\
{\bf Trace(s) to Use Case(s):} View Tasks\\

\subsection{Requirement: Viewing Task Scheduling Chart}

{\bf ID:} F03\\
{\bf Version:} 1\\
{\bf Rationale:} Users must be able to consult a GANTT scheduling chart, in order to properly plan and order their work schedules.\\
{\bf Priority:} Must\\
{\bf Status:} Proposed\\
{\bf Trace(s) to Use Case(s):} View Tasks\\

\subsection{Requirement: Log Hours to Task}

{\bf ID:} F04\\
{\bf Version:} 1\\
{\bf Rationale:} Users must be able to indicate the number of hours that have been invested into completing a task.\\
{\bf Priority:} Must\\
{\bf Status:} Proposed\\
{\bf Trace(s) to Use Case(s):} View Tasks\\

\subsection{Requirement: Mark Task Completion}

{\bf ID:} F05\\
{\bf Version:} 1\\
{\bf Rationale:} Once a worker has finished work on an assigned task, he must be able to mark the task as being completed.\\
{\bf Priority:} Must\\
{\bf Status:} Proposed\\
{\bf Trace(s) to Use Case(s):} View Tasks\\

\subsection{Requirement: Create a Task}

{\bf ID:} F06\\
{\bf Version:} 1\\
{\bf Rationale:} Managers must have the ability to create new tasks, which will later be assigned to an appropriate worker.\\
{\bf Priority:} Must\\
{\bf Status:} Proposed\\
{\bf Trace(s) to Use Case(s):} Manage Tasks\\

\subsection{Requirement: Assign a Task to a Worker}

{\bf ID:} F07\\
{\bf Version:} 1\\
{\bf Rationale:} Managers must have the ability to assign tasks to a particular worker.\\
{\bf Priority:} Must\\
{\bf Status:} Proposed\\
{\bf Trace(s) to Use Case(s):} Manage Tasks\\

\subsection{Requirement: Modify Tasks}

{\bf ID:} F08\\
{\bf Version:} 1\\
{\bf Rationale:} Managers must have the ability to modify task deliverables and assignments, in order to properly govern the progression of projects.\\
{\bf Priority:} Must\\
{\bf Status:} Proposed\\
{\bf Trace(s) to Use Case(s):} Manage Tasks\\

\subsection{Requirement: Login}

{\bf ID:} F09\\
{\bf Version:} 1\\
{\bf Rationale:} All users must be able to log in to the system. This process also allows differentiation between managers (who can create/edit all tasks), and other workers.\\
{\bf Priority:} Must\\
{\bf Status:} Proposed\\
{\bf Trace(s) to Use Case(s):} Login\\


\clearpage
\section{Non-Functional Constraints}

This section describes the main non-functional constraints on the system, such as platform, performance, usability, 
and security. These requirements will be tested according to certain measures as described below.

\subsection{Platform Constraints}

\projectname\ is built using the Java programming language and an XML data structure.
This makes \projectname\ platform-independent and portable over the main
operating systems: Microsoft Windows, Linux, and Mac. Portability can be easily tested 
by running the software over different operating systems.

\subsection{Performance Constraints}

\subsubsection{Speed} \label{uc:1}

\projectname\ should execute transactions in timely manner. The system should instantly (1 second maximum)
update the people view when the user modifies the task view.

\subsubsection{Reliability} \label{uc:2}

The system should not crash during operation. This constraint can be tested by running the 
system 25 times and count the number of crashes.\\
The system should inform the user if the input file is not in the right format. 
This constraint can be tested by providing an incorrectly formatted file as an input to the system. 
The system should inform the user regarding this issue.

\subsection{Usability Constraints}

\begin{itemize}
\item The system provides users with a user friendly graphical user interface.
\item Users can learn how to use the system in a short period of time.
\item The user can easily identify the different views on the screen.
\item Only one user can access the system at once.
\end{itemize}

\subsection{Security Constraints}

Users of the system are required to login before using the system.
Only users who are managers can perform managerial operations as described in the "Actors" section. 
This can be tested by logging in as a worker and trying to perform an operation that is strictly for managers.

\clearpage
\section{Data Dictionary}

\textbf{Employee:} This term is used to describe individual workers. Employees are concerned with completing their personal tasks, which have been assigned to them by their manager.\\

\textbf{Worker:} This term is used interchangeably with Employee.\\

\textbf{Manager:} This term is used to describe employees that govern other employees. Managers are concerned with governing the task assignments for a group of employees. Note that managers also act as individual employees, as described above, because they receive personal task assignment from their own managers.\\

\textbf{View Tasks:} This term, as used in the System Use Case Diagram, as well as in the functional constraints (in reference to use cases), is used to describe the general grouping of tasks undertaken by the Worker group of actors. ``Viewing'' tasks is taken to mean visually exploring task assignments and status, \textbf{as well as} modifying the status of tasks assigned to the viewer in particular.\\

\textbf{Manage Tasks:} This term, as used in the System Use Case Diagram, as well as in the functional constraints (in reference to use cases), is used to describe the general grouping of tasks undertaken by the Manager group of actors. ``Managing'' tasks is taken to mean creating, assigning, or modifying tasks that do not necessarily belong to the manager. Thus, managers have the power to ``View'' tasks, as stated in the previous definition, and to manipulate tasks for the Workers in their department as well.\\

\clearpage
\section{References}

{\bf 1-} V. Aaltio. ``User Requirements Document.'' Internet: http://www.soberit.hut.fi/T-76.115/05-06/ohjeet/template/requirements.html\#\_Toc82800395, Sept. 8, 2005 [Feb. 04, 2012].\\

{\bf 2-} G. Butler. ``Requirements Document Template'' \\ Internet: http://users.encs.concordia.ca/~gregb/home/se-w2012-project.html, Jan. 17, 2012 [Feb. 04, 2012].\\

\appendix

\clearpage
\section{Description of Data File Formats}
This section describes the various XML file formats used to store application data used by the \projectname\
task management system.

\subsection{Description of File Format: Tasks}
\lstset{language=XML, backgroundcolor=\color{Tan!20!Yellow!20}, frame=single, numbers=left, showstringspaces=false, breaklines=true}
\begin{lstlisting}
<task ID="#" duration="# of hours">
	<title>Task Name</title>
	<description>This is where you write a desc. for the task...</description> 
	<deliverable>dd-mm-yy</deliverable>
	<deadline>dd-mm-yy</deadline>
	<assignee>Name of person assigned to</assignee>
</task>
\end{lstlisting}

\subsection{Description of File Format: Persons}

\begin{lstlisting}
<worker hours="# of hours assigned">
	<name>Name of the person</name>
	<task ID="#"></task>
	<task ID="#"></task>
	...
	<task ID="#"></task>
</worker>
\end{lstlisting}

\clearpage
\subsection{Use Case Diagram}
%%%%%%%%%%%%%%%%%%%%%%%% DIAGRAM
\useCaseDiagram

\parbox{500pt}
{
\scriptsize \textbf{NOTE:} Please consult the \textbf{Data Dictionary} section of this document for any clarification on the terms used in the above diagram (ex.: ``View Tasks''). For descriptions of the particular actions described in the diagram (ex.: ``Create a Task'') see the \textbf{Functional Constraints} section of this document.\\
}

% ANNEX: The Domain Model Diagram
\clearpage
\subsection{Domain Model Diagram}
\domainDiagram

\end{document}
